package com.chaoyi;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.List;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.chaoyi.dao.mysql.baidumv.OrderMapper;
import com.chaoyi.service.OrderService;
import com.chaoyi.service.UserActionService;
import com.chaoyi.vo.OrderStat;

public class Bootstrap {

	public static void main(String[] args) {
		ApplicationContext content = new ClassPathXmlApplicationContext("spring/applicationContext.xml");
//		UserActionService userActionService = content.getBean(UserActionService.class);
//		DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
//		LocalDate startTime = LocalDate.of(2016, 6, 3);
//		LocalDate endTime = LocalDate.of(2016, 7, 2);
//		while(startTime.isBefore(endTime)){
//			userActionService.userActionStat(formatter.format(startTime), formatter.format(startTime.plusDays(1)));
//			startTime = startTime.plusDays(1);
//		}
//		OrderService orderService = content.getBean(OrderService.class);
//		DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
//		LocalDate startTime = LocalDate.of(2016, 5, 5);
//		LocalDate endTime = LocalDate.of(2016, 7, 4);
//		while(startTime.isBefore(endTime)){
//			orderService.orderStat(formatter.format(startTime), formatter.format(startTime.plusDays(1)));
//			startTime = startTime.plusDays(1);
//		}
		

		
	}

}
